<!--
/*
*All rights reserved: Json.
*Links:http://www.liyaoquan.cn.
*Links:http://imarkchina.cn.
*Links:http://www.imarkchina.cn.
*/
-->
{A('public/tools')}
<script type="text/javascript">
	function selectAll(){
		var checklist = document.getElementsByName("id[]");
		if(document.getElementById("controlAll").checked) {
			for(var i=0;i<checklist.length;i++) {
				checklist[i].checked = 1;
			}
		}else{
			for(var j=0;j<checklist.length;j++)  {
				checklist[j].checked = 0;
			}
		}
	}
</script>
<div class="main-wrap">
	<div class="crumb-wrap">
		<div class="crumb-list">
			<span class="crumb-name">用户管理</span>
		</div>
	</div>
	<div class="result-wrap">
		<form action="{U('AllSet')}" method="post">
			<div class="result-title">
				<div class="result-list">
					<input type="submit" class="icon-font" value="批量删除" name="del" />
					<input type="submit" class="icon-font" value="批量禁言" name="close" />
				</div>
			</div>
			<div class="result-content">
				<table class="result-tab" width="100%">
					<tr>
						<th class="tc" width="5%">
							<input class="allChoose" onclick="selectAll()" id="controlAll" type="checkbox" />
						</th>
						<th>用户名</th>
						<th>ID</th>
						<th>注册时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
					{foreach $users $v}
					<tr>
						<td class="tc">
							<input name="id[]" value="{$v['user_id']}" type="checkbox">
						</td>
						<td>{$v['username']}</td>
						<td>{$v['user_id']}</td>
						<td>{$v['regtime']}</td>
						<td>{if $v['talk']=='open'}正常{else}禁言中{/if}</td>
						<td>
							{if $v['talk']=='open'}<a class="link-update" href="{U('userupdata',array('uid'=>$v['user_id'],'check'=>0))}">禁言</a>{else}<a class="link-update" href="{U('userupdata',array('uid'=>$v['user_id'],'check'=>1))}">解除禁言</a>{/if}
							<a class="link-del" href="{U('deluser', array('uid'=>$v['user_id']))}">删除</a>
						</td>
					</tr>
					{/foreach}
				</table>
				<div class="list-page"> {$page}</div>
			</div>
		</form>
	</div>
</div>
</div>
</body>
</html>